package com.pond.pond.client;

import com.pond.common.core.domain.R;
import com.pond.pond.config.FeignInnerConfig;
import com.pond.pond.domain.PondDeptVo;
import com.pond.system.api.domain.SysDept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(contextId = "deptClient", value = "pond-system", configuration = FeignInnerConfig.class)
public interface DeptClient {
    /**
     * 调用系统服务的部门权限校验接口
     */
    @PostMapping("/dept/checkDataScope/{deptId}")
    void checkDeptDataScope(@PathVariable("deptId") Long deptId);

    @GetMapping("/dept/inner/{deptId}")
    R<PondDeptVo> getDeptById(@PathVariable("deptId") Long deptId);

    @PostMapping("/dept/batch")
    R<List<SysDept>> getDeptBatch(@RequestBody List<Long> deptIds);

    @GetMapping("/dept/pondList")
    R<List<PondDeptVo>> getAllFishingDepts();
}
